package a.i.a;

import a.c.y;
import a.c.z;

import java.util.Comparator;

abstract class k
{
  private Comparator a;
  protected b c;
  protected int e;
  
  public k(Comparator paramComparator)
  {
    this.a = paramComparator;
  }
  
  public b a()
  {
    return this.c;
  }
  
  public void b()
  {
    this.c = null;
  }
  
  public boolean c()
  {
    return this.c == null;
  }
  
  public Object d()
  {
    if ((d.e) || (!c())) {
      return a(this.c).d;
    }
    return null;
  }
  
  public Object e()
  {
    if ((d.e) || (!c()))
    {
      Object localObject = a(this.c).d;
      b(localObject);
      return localObject;
    }
    return null;
  }
  
  public boolean a(Object paramObject)
  {
    return e(paramObject) != null;
  }
  
  public int f()
  {
    return this.e;
  }
  
  public abstract void b(Object paramObject);
  
  public abstract void d(Object paramObject);
  
  protected int a(Object paramObject1, Object paramObject2)
  {
    return this.a.compare(paramObject1, paramObject2);
  }
  
  protected b e(Object paramObject)
  {
    boolean bool2 = d.e;
    boolean bool1 = d.d;
    b localb = this.c;
    while (localb != null)
    {
      if (!bool2) {
        if (a(paramObject, localb.d) < 0)
        {
          localb = localb.b;
          if ((!bool2) && (!bool1)) {
            continue;
          }
        }
      }
      if (!bool2)
      {
        if (a(paramObject, localb.d) > 0) {
          localb = localb.c;
        }
      }
      else {
        if (!bool1) {
          continue;
        }
      }
      if (bool2) {
        break label83;
      }
      return localb;
    }
    label83:
    return localb;
  }
  
  protected static void a(b paramb1, b paramb2)
  {
    Object localObject = paramb1.d;
    paramb1.d = paramb2.d;
    paramb2.d = localObject;
  }
  
  protected b a(b paramb)
  {
    boolean bool2 = d.e;
    do
    {
      boolean bool1 = d.d;
      while (!bool1)
      {
        if (paramb.b == null) {
          break;
        }
        if (bool1) {
          break label33;
        }
        paramb = paramb.b;
      }
    } while (bool2);
    label33:
    return paramb;
  }
  
  protected b b(b paramb)
  {
    boolean bool2 = d.e;
    boolean bool1 = d.d;
    if (!bool2) {
      if (paramb.c != null) {
        return a(paramb.c);
      }
    }
    b localb;
    do
    {
      for (localb = paramb.a; !bool1; localb = localb.a)
      {
        if (localb == null) {
          break;
        }
        if (bool1) {
          break label68;
        }
        if (paramb != localb.c) {
          break;
        }
        paramb = localb;
      }
    } while (bool2);
    label68:
    return localb;
  }
  
  public y g()
  {
    return h().h();
  }
  
  public z h()
  {
    z localz = new z();
    if ((d.e) || (a() != null)) {
      a(a(), localz);
    }
    return localz;
  }
  
  private void a(b paramb, z paramz)
  {
    if (!d.e)
    {
      if (paramb.a() != null) {
        a(paramb.a(), paramz);
      }
      paramz.add(paramb.d);
    }
    if (paramb.c() != null) {
      a(paramb.c(), paramz);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.i.a.k

 * JD-Core Version:    0.7.0.1

 */